﻿using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using VisionApp.Interface;
using VisionAppManager.Model;

namespace VisionAppManager.ViewModel
{
    public class VMCfg : ViewModelBase
    {
        public RelayCommand SaveCommand { get; private set; }

        private Worker _worker;
        public Worker Worker
        {
            get
            {
                return _worker;
            }
            set
            {
                _worker = value;
                RaisePropertyChanged("Worker");
            }
        }

        public VMCfg(IWorker worker)
        {
            Worker = (Worker)worker;
            SaveCommand = new RelayCommand(() => Worker.SaveCfgData());
        }
    }
}
